package CtrlLayer;
import ModelLayer.*;
import java.util.ArrayList;


import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
/**
 * CtrlCustomerTest.java
 * @author Brian Lassen
 * @version 21. Marts 2012
 */
public class CtrlCustomerTest {

	@Before
	public void setUp() throws Exception {
	}

	@Test
	public final void testCtrlCustomer() {
		fail("Not yet implemented"); // TODO
	}

	@Test
	public final void testFindAllCustomer() {
		ArrayList<Customer> allCustomer = new ArrayList<Customer>();
		allCustomer = CtrlCustomer.findAllCustomer();
		for (Customer allCust : allCustomer){
			System.out.println(allCust.getId() + " " + allCust.getFname() + " " + allCust.getLname());
			System.out.println(allCust.getAddress());
			System.out.println(allCust.getZipcode() + " " + allCust.getCity());
			System.out.println(allCust.getPhone());
			System.out.println();
		}
	}

	@Test
	public final void testFindById() {  // id >= 10000
		Customer myCustomer = new Customer();
		myCustomer = CtrlCustomer.findById(10000);
		System.out.println(myCustomer.getFname() + " " + myCustomer.getLname());
		System.out.println(myCustomer.getAddress());
		System.out.println(myCustomer.getZipcode() + " " + myCustomer.getCity());
		System.out.println(myCustomer.getPhone());
		System.out.println();
	}

	@Test
	public final void testFindByFname() {

		fail("Not yet implemented"); // TODO
	}

	@Test
	public final void testFindByLname() {
		fail("Not yet implemented"); // TODO
	}

	@Test
	public final void testFindByAddress() {
		fail("Not yet implemented"); // TODO
	}

	@Test
	public final void testFindByPhone() {
		fail("Not yet implemented"); // TODO
	}

	@Test
	public final void testUpdateCust() {
		fail("Not yet implemented"); // TODO
	}

	@Test
	public final void testInsertNew() {
		fail("Not yet implemented"); // TODO
	}

	@Test
	public final void testDeleteCust() {
		fail("Not yet implemented"); // TODO
	}

}
